﻿namespace Citi.EmailSender.Domain.Mapping
{
    public class AttachmentMap : EntityMap<Attachment>
    {
        public AttachmentMap()
        {
            Property(x => x.Path, m => { m.NotNullable(true); m.Length(500); });
            Property(x => x.EmailId, m => { m.NotNullable(true); });

            ManyToOne(x => x.Email, m => { m.Column("EmailId"); m.Update(false); m.Insert(false); });
        }
    }
}
